function updateRequest(id,action,form) {
	var forma = document.getElementById(form);
	forma.op.value=action;
	forma.id.value=id;
	doProcess(form);
}

function deleteconfirm() {
		return confirm(confirmDeleteMessage);	
}

function openURL(url) {
 	window.open(url);	
}

function showHelp(e,id,lang) {
	help = new Poat({dialog: false});
	help.event = e;
	var param=new Array();
	param['id']=id;
	param['lang']=lang;
	help.execute("getHelp",param);
}

function actMenu(action) {
	var forma = document.getElementById('menu_form');
	forma.action.value = action;
	browseTo(xajax.getFormValues('menu_form'));
}

function postMenu(action) {
	var forma = document.getElementById('menu_form');
	forma.action.value = action;
	forma.submit();
}

function browseTo(params) {
	showprogress();
	xajax_browseTo(params);
}

function doProcess(form) {
	browseTo(xajax.getFormValues(form));	
}

function goInto(op,frm,f) {
	var forma = document.forms[frm];
	forma[f].value=op;
	browseTo(xajax.getFormValues(frm));
}

function processForm(form) {
	var forma = document.forms[form];
	forma.submit();
	/*	
	var params = "";
	for (i=0;i<forma.length;i++) {
	  params += forma[i].name + "=" + forma[i].value + "&";
	}
	sendThisWait(params);
	*/
}

function isEnterKey(e) {
    key = (document.all) ? e.keyCode : e.which;
    return (key == 13);
}

function trim(trim_value){
	if(trim_value.length < 1){
		return "";
	}
	trim_value = rtrim(trim_value);
	trim_value = ltrim(trim_value);
	if(trim_value==""){
		return "";
	}	else{
		return trim_value;
	}
}

function rtrim(valor){
	var w_space = String.fromCharCode(32);
	var v_length = valor.length;
	var strTemp = "";
	if(v_length < 0){
		return "";
	}
	var iTemp = v_length -1;
	
	while(iTemp > -1){
		if(valor.charAt(iTemp) == w_space){
		}	else{
			strTemp = valor.substring(0,iTemp +1);
			break;
		}
		iTemp = iTemp-1;
	} //End While
	return strTemp;

} //End Function

function ltrim(VALUE){
	var w_space = String.fromCharCode(32);
	if(v_length < 1){
		return"";
	}
	var v_length = VALUE.length;
	var strTemp = "";
	
	var iTemp = 0;
	
	while(iTemp < v_length){
		if(VALUE.charAt(iTemp) == w_space){
		}	else{
			strTemp = VALUE.substring(iTemp,v_length);
			break;
		}
		iTemp = iTemp + 1;
	} //End While
	return strTemp;
} //End Function